﻿{% extends "gma/base.html" %}
{% load mytag %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__bd">
    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__hd"> {{ begin_time }} ~ {{ end_time }} 消费记录 </div>
        <div class="weui-panel__bd">
            {% for log in logs %}
            <a href="{% url 'gma:caster_detail' log.uid %}" class="weui-media-box weui-media-box_appmsg weui-cell_access">
                <div class="weui-media-box__hd">
                    <img class="weui-media-box__thumb avatar" src="{{ log.from_avatar|cdn }}" alt="">
                </div>

                {% if log.type == 102 or log.type == 202 %}
                    <i class="fa fa-file-video"></i> &nbsp; &nbsp;
                {% elif log.type == 103 or log.type == 203 %}
                    <i class="fa fa-phone-volume"></i> &nbsp; &nbsp;
                {% elif log.type == 104 or log.type == 204 %}
                    <i class="fa fa-gift"></i> &nbsp; &nbsp;
                {% elif log.type == 105 or log.type == 205 %}
                    <i class="fa fa-comments"></i> &nbsp; &nbsp;
                {% elif log.type == 106 %}
                    <i class="fab fa-vimeo-v"></i> &nbsp; &nbsp;
                {% else %}
                    <i class="fa fa-question"></i> &nbsp; &nbsp;
                {% endif %}

                <div class="weui-media-box__hd">
                    <img class="weui-media-box__thumb avatar" src="{{ log.to_avatar|cdn }}" alt="">
                </div>

                <div class="weui-media-box__bd">
                    <p class="weui-media-box__desc"> {{ log.add_time|date:"H:i:s" }} #{{ log.id }}</p>
                    <p class="weui-media-box__desc">类型: {{ log.type|consume_type }}</p>

                    {% if log.type < 200 %}
                        <p class="weui-media-box__desc">费用: {{ log.amount }} <i class="fa fa-gem"></i></p>
                    {% else %}
                        <p class="weui-media-box__desc">费用: {{ log.amount }} <i class="fa fa-candy-cane"></i></p>
                    {% endif %}
                </div>

                <div class="weui-cell__ft">
{#                    <div> {{ log.chat_seconds|readable_seconds }} </div>#}
                </div>
            </a>
            {% endfor %}

           <div class="weui-media-box weui-media-box_text">
                <ul class="weui-media-box__info">
                    <li class="weui-media-box__info__meta"> {{ begin_time }} ~ {{ end_time }} 消费记录 </li>
                </ul>
           </div>
        </div>
    </div>
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
{% endblock extra_js %}